package com.vf.admin.miaodong.service.impl;

import com.vf.admin.common.splitpage.SplitPageBean;
import com.vf.admin.miaodong.dao.AfterVerSionDao;
import com.vf.admin.miaodong.entity.AppVerSion;
import com.vf.admin.miaodong.service.AfterVerSionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * 版本升级
 */
@Service
public class AfterVerSionServiceImpl implements AfterVerSionService {

    @Autowired
    private AfterVerSionDao verSionDao;

    /**
     * 综合查询
     */
    @Override
    public List<AppVerSion> find(Map<String, Object> paraMap, SplitPageBean splitPage) {
        return verSionDao.find(paraMap,splitPage);
    }

    /**
     * 详情
     */
    @Override
    public AppVerSion getId(int id) {
        return verSionDao.get(id);
    }

    /**
     * 新增或者更新
     * @throws Exception
     */
    @Override
    public void save(AppVerSion versions) {
        verSionDao.save(versions);
    }

    /**
     * 删除
     */
    @Override
    public void del(int id) {
        verSionDao.del(id);
    }

    /**
     * 查询最新的版本信息  客户端使用
     */
    @Override
    public AppVerSion latestVersion(Map<String, String> paraMap) {
        return verSionDao.latestVersion(paraMap);
    }

}
